from MyFrame.core import Variable, Function
import numpy as np

class Sin(Function):
    def forward(self, x):
        return np.sin(x)
    def backward(self, gy):
            x = self.inputs[0].data
            gx = gy * np.cos(x)
            return gx
def sin(x):
    return Sin()(x)
